package com.zhaoyu.wemedia.controller;

import com.zhaoyu.apis.wemedia.WmLoginControllerApis;
import com.zhaoyu.model.common.dtos.ResponseResult;
import com.zhaoyu.model.media.dtos.WmUserDto;
import com.zhaoyu.wemedia.service.WmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class WmLoginController implements WmLoginControllerApis {

    @Autowired
    private WmUserService wmUserService;;

    @Override
    @PostMapping("/in") // json格式的数据
    public ResponseResult loginWmUser(@RequestBody WmUserDto wmUserDto) {
        return wmUserService.login(wmUserDto);
    }

}